﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class pages_Projects : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        if (Request.Params["projectid"] != null)
        { 
            int proId;
            Int32.TryParse(Request.Params["projectid"].ToString(), out proId);
            if (proId != 0)
            {
                SqlDataSource1.SelectCommand = "SELECT [id], [ProName], [ProCaption], [ProContent], [ProTechLang], [ProDatabase], [ProType], [ProTools], [ProURL], [ProCatagory] FROM [Projects] WHERE ([id] = @PorId) ORDER BY [ProDisplaySerial]";
                SqlDataSource1.SelectParameters.Add("PorId", proId.ToString());
            }
        
        }
    }
}
